import TSpace.*;

public class Server // extends Thread
{
	private TSServer myServer;
	
	public Server(String serverMachineName, String serverMachinePort, int spaceNumber)
	{
		String args[] = new String[4];
		
		args[0] = "-ORBInitialHost";
		args[1] = serverMachineName;
		args[2] = "-ORBInitialPort";
		args[3] = serverMachinePort;
//		args[4] = "-Djava.naming.provider.url=iiop://" + serverMachineName + ":" + serverMachinePort;
//		args[5] = "-Dcom.sun.CORBA.ORBServerHost=" + serverMachinePort;

		myServer = new TSServer(args, spaceNumber);
	}
	
	public void run()
	{	
		myServer.run();
	}

	public void update(TSpace.Tuple[] tuples)
	{
		myServer.update(tuples);
	}

	public TupleImplementation getTupleImplementation()
	{
		return myServer.getTupleImplementation();
	}

}
